<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
	
	<h1>Contents</h1>
	<div class="dept_board_div">
		<table id="content_table">
			<tr>
				<td id="board_no">${boardContents.deptBoardNo}</td>
				<td id="board_id">${boardContents.id}</td>
				<td id="board_title">${boardContents.title}</td>
				<td>
				<fmt:formatDate value="${boardContents.writeDate }" type="both"/><br/>
				<fmt:formatDate value="${boardContents.modifyDate }" type="both"/></td>
			</tr>
			<tr>
				<td colspan="4"><div class="dept_board_article">${boardContents.article}</div></td>
			</tr>
			<tr>
				<td colspan="4">${boardContents.readCount}</td>
			</tr>
			<tr>
				<td colspan="4">${boardContents.commentCount}</td>
			</tr>
		</table>
		<a onclick="dept_board_modify(${boardContents.deptBoardNo})"> 
		<input type="button" value="수정" id="modify_btn" class="btn"></a> 
		<a onclick="dept_board_delete(${boardContents.deptBoardNo})" href="#"> 
		<input type="button" value="삭제" id="delete_btn" class="btn"></a> 
		<a onclick="dept_board_list_with_num(${pageNum})"> 
		<input type="button" value="목록" id="list_btn" class="btn"></a>
		
		<div id="board_comment">
			<textarea id="commentContents" rows="3" cols="100" style="width:900px;"></textarea> 
			<input type="button" value="작성" class="btn" onclick="dept_board_comment_write(${boardContents.boardNo})" />
			
			<c:forEach var="comment" items="${commentList }">
			<hr>
				${comment.commentContents }/${comment.id }/
				<fmt:formatDate	value="${comment.writeDate }" type="both" />
				
			</c:forEach>
		</div>
	</div>